package com.cn.jx.manager.po;

import static com.jx.util.CodeUtil.getRandomId;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import com.cn.jx.common.entity.BaseIdEntity;
import com.jx.enumType.YesNoEnum;

@Entity
@Table(name="SYS_MESSAGE_USER")
public class MessageUser extends BaseIdEntity {

	/** <p>TODO <p>{@link long serialVersionUID}*/
	private static final long serialVersionUID = -3979197619040933492L;

	@Column(name="mess_id",length=64)
	private String messageId;
	
	@Column(name="sender",length=64)
	private String sender;
	
	@Column(name="user_id",length=64)
	private String userId;
	
	@Column(name="oper_status")
	private Integer receivStatus;
	
	@Column(name="is_del")
	private Integer delFlg;
	
	@Column(name="oper_method")
	private String receivMethod;
	
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name="operat_time")
	private Date operatTime;
	
	@Temporal(TemporalType.TIMESTAMP)//设置为时间类型
	@Column(name="send_time")
	private Date sendTime;
	
	public static MessageUser getInstance(String operUser){
		Date day=new Date();
		MessageUser m=new MessageUser();
		m.setId(getRandomId());
		m.setOperatTime(day);
		m.setSendTime(day);
		m.setDelFlg(YesNoEnum.NO.getCode());
		m.setUserId(operUser);
		return m;
	}
	
	
	/** <p>{@link Date Date getSendTime()*/
	public Date getSendTime() {
		return sendTime;
	}


	/** <p>setSendTime({@link Date Date sendTime})*/
	public void setSendTime(Date sendTime) {
		this.sendTime = sendTime;
	}


	/** <p>{@link String String getSender()*/
	public String getSender() {
		return sender;
	}

	/** <p>setSender({@link String String sender})*/
	public void setSender(String sender) {
		this.sender = sender;
	}

	/** <p>{@link String String getMessageId()*/
	public String getMessageId() {
		return messageId;
	}

	/** <p>setMessageId({@link String String messageId})*/
	public void setMessageId(String messageId) {
		this.messageId = messageId;
	}


	/** <p>{@link String String getUserId()*/
	public String getUserId() {
		return userId;
	}

	/** <p>setUserId({@link String String userId})*/
	public void setUserId(String userId) {
		this.userId = userId;
	}

	/** <p>{@link Integer Integer getReceivStatus()*/
	public Integer getReceivStatus() {
		return receivStatus;
	}

	/** <p>setReceivStatus({@link Integer Integer receivStatus})*/
	public void setReceivStatus(Integer receivStatus) {
		this.receivStatus = receivStatus;
	}

	/** <p>{@link Integer Integer getDelFlg()*/
	public Integer getDelFlg() {
		return delFlg;
	}

	/** <p>setDelFlg({@link Integer Integer delFlg})*/
	public void setDelFlg(Integer delFlg) {
		this.delFlg = delFlg;
	}

	/** <p>{@link String String getReceivMethod()*/
	public String getReceivMethod() {
		return receivMethod;
	}

	/** <p>setReceivMethod({@link String String receivMethod})*/
	public void setReceivMethod(String receivMethod) {
		this.receivMethod = receivMethod;
	}

	/** <p>{@link Date Date getOperatTime()*/
	public Date getOperatTime() {
		return operatTime;
	}

	/** <p>setOperatTime({@link Date Date operatTime})*/
	public void setOperatTime(Date operatTime) {
		this.operatTime = operatTime;
	}

	
}
